package com.ly.dingtalk.service.chat;

import com.dingtalk.api.request.OapiChatCreateRequest;
import com.dingtalk.api.request.OapiChatUpdateRequest;
import com.dingtalk.api.response.OapiChatCreateResponse;
import com.dingtalk.api.response.OapiChatGetResponse;
import com.dingtalk.api.response.OapiChatUpdateResponse;

import lombok.NonNull;

/**
 * 群组相关
 *
 * @author wangzhen
 */
public interface IDingChatHandler {
    // ============================ 会话1.0 start =====================================

    /**
     * https://open.dingtalk.com/document/orgapp/obtain-group-openconversationid    
     * 根据群chatId获取openConversationId
     *
     * @param chatId 会员id —> 后期钉钉将废弃该参数，使用openConversationId替代
     * @return openConversationId
     */
    String getOpenConversationIdByChatId(@NonNull String chatId);
    
    /**
     * https://open.dingtalk.com/document/orgapp/create-group-session
     * @Description: 创建群
     */
    OapiChatCreateResponse createChat(OapiChatCreateRequest req);
    
    /**
     * https://open.dingtalk.com/document/orgapp/modify-a-group-session
     * @Description: 更新群聊
     * @date 2023-12-29 02:17:23
     */
    OapiChatUpdateResponse updateChat(OapiChatUpdateRequest req);
    
    /**
     * https://open.dingtalk.com/document/orgapp/obtain-a-group-session
     * @Description: 查询群信息
     * @date 2023-12-29 02:19:22
     */
    OapiChatGetResponse getChatById(@NonNull String chatId);
    // ============================ 会话1.0 end =====================================
    
    // ============================ 会话2.0 start =====================================
    
    // ============================ 会话2.0 end =====================================
    
}
